#ifndef MATERIAL_TEXTURE_H
#define MATERIAL_TEXTURE_H

#include "material_solid.h"
#include "color.h"
#include "comment_stream.h"

class TextureMaterial : public SolidMaterial
{
  public:
    TextureMaterial(Scene *scene);
    virtual ~TextureMaterial();
    void loadAttributes(std::istream &inData);
  protected:
    Color m_getColor(Collision c);
  private:
    Color m_interpolate(double percent, unsigned int u, unsigned int v, 
                        unsigned int a, unsigned int b);
    Color *m_image;
    unsigned int m_width, m_height, m_repeat;
};

#endif

